#include <stdlib.h>
#include <stdio.h>

#define ONE_K (1024)

int main()
{
	char *some_memory;
	int exit_code = EXIT_FAILURE;

	some_memory = (char *)malloc(ONE_K);
	printf("&some_memory = %p\n", &some_memory);
	if (some_memory != NULL)
	{
		free(some_memory);							 // free释放内存，不再属于这个进程，由malloc函数库负责管理。
		printf("&some_memory = %p\n", &some_memory); // free之后地址不变
		printf("Memory allocated and freed again\n");
		exit_code = EXIT_SUCCESS;
	}
	exit(exit_code);
}
